package interview.sync.array;/*

 */

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @ClassName HashMapDemo
 * @Author Final
 * @Project DataStructures
 */
public class HashMapDemo {

    public static void main(String[] args) {
//        Map<String ,Object> map=new HashMap<>();

        Map<String ,Object> map=new ConcurrentHashMap<>();

        for (int i=0;i<30;i++){

            String key= String.valueOf(i);
            new Thread(()->{
                map.put(key,UUID.randomUUID().toString().subSequence(0,8));
                System.out.println(map);
            },String.valueOf(i)).start();
        }

    }
}
